import {operationLog} from '@/api/log/index.ts'

export const tracking = async (module:any, operation_person:any, operation_objcet:any, operation_level:any,operation_status:any) => {
	if (module == '管理员') {
		// 操作内容
		let operation_content = `对管理员'${operation_objcet}'进行了删除操作`
        let data = {
            operation_person,
            operation_content,
            operation_level
        }
		await operationLog(data)
	}
	if (module == '产品') {
		// 操作内容
		let operation_content = `对产品'${operation_objcet}'进行了审核操作，审核结果为'${operation_status}'`
        let data = {
            operation_person,
            operation_content,
            operation_level
        }
		await operationLog(data)
	}
}